Flow's Attributes

Attributes are a fundamental piece of your automations.

You can use attributes to store temporary information into your flows.

Attributes play a pivotal role in enhancing the capabilities and functionality of your chatbot within conversational flows. These essential pieces of data serve as the building blocks of personalized and context-aware interactions, enabling your chatbot to understand, remember, and respond to user input effectively. Whether it's storing user data, tracking order histories, or maintaining session context, attributes empower your chatbot to provide a seamless and tailored user experience. In this section, we'll delve into the significance of attributes and how they can be harnessed to create dynamic, intelligent, and user-centric chatbot interactions.

In Tiledesk you have the following attributes categories:

  1. User defined attributes
  2. Most used attributes
  3. System defined attributes
  4. Uploaded documents attributes
  5. Uploaded image attributes
  6. Lead attributes attributes

User defined attributes

User defined attributes are really important when you want to get user data or get data from external web services (i.e. Web Requests, GPT Tasks etc.)

You can define a user attribute simply opening the {} button available in every place where the use of an attribute is necessary. You can for example create a Reply Action and click on the {} symbol on the lower right corner of the text box:

The attributes selector opens.

Press the " + Add cutom attribute" button and choose a name for your attribute in the popup

Now the attribute is available in the User defined section, on top of the Attributes selector popup

Simply click on your attribute and it will appear in your text flow

Now whenever an attribute will be available in the flow it will rendered in place of the one in double curly brackets in your Reply text.

 

Most used attributes

 

Most used catogory are special attributes often used inside a conversation.

lastUserText (String)

The last text the user typed. This is overwritten on each user reply

user_country (String)

The user Country as decoded by Tiledesk

user_city (String)

The user City as decoded by Tiledesk

user_language (String)

The user language decoded on channel

transcript (String)

All the conversation messages exchanged with this chatbot during the chat

 

System defined attributes

 

department_name (String)

The name of the department where this chatbot is activated

department_id (String)

The ID of the department where this chatbot is activated

project_id (String)

The name of the project where this chatbot belongs to

last_message_id (String)

The unique ID of the last message sent

conversation_id (String)

This conversation unique ID

chatbot_name (String)

This chatbot name

chatbot_token (String)

You can use this token to invoke Tiledesk APIs. This token is renewed continuosly in the flow and each token will expire in 4 hours from the time you got it in the flow

user_id (String)

The user unique ID inside Tiledesk database

user_agent (String)

The web user agent where this conversation initiated

chatChannel (String)

The channel where this conversation belongs to. Ex. "web", "whatsapp", "facebook", "telegram"

user_source_page (String)

The page where this conversations is runinng. Only available on channel "web"

chat_url (String)

The url of the Chat to send to a colleague to chat with this user. Use "Invite human" action to invite the human to this chat.

user_ip_address (String)

The user IP address, when available

ticketId (String)

The ticketId automatically assigned to each conversation

 

Uploaded documents attributes

 

lastUserDocumentAsAttachmentURL (String)

The public URL to access the document uploaded by the user. It's empy if no document is uploaded. Use this attribute to provide a link to download the document for the end-users. This URL will expire after 5 minutes

lastUserDocumentURL (String)

The public URL to access the document uploaded by the user. It's empy if no document is uploaded. This URL will expire after 5 minutes

lastUserDocumentName (String)

The name of the document uploaded by the user. It's empy if no document is uploaded

lastUserDocumentType (String)

The type of the document uploaded by the user. It's empy if no document is uploaded

 

Uploaded Image Attributes  
 

lastUserImageURL (String)

The public URL to access the image uploaded by the user. It's empy if no image is uploaded. This URL will expire after 5 minutes

lastUserImageName (String)

The name of the image uploaded by the user. It's empy if no image is uploaded

lastUserImageType (String)

The type of the image uploaded by the user. It's empy if no image is uploaded

lastUserImageHeight (String)

The height in pixel of the image uploaded by the user. It's empy if no image is uploaded

lastUserImageWidth (String)

The wdth in pixel of the image uploaded by the user. It's empy if no image is uploaded

 

Lead info Attributes

 

currentPhoneNumber (String)

The user phone used in the current conversation (i.e. coming from Whatsapp / SMS channels)

userPhone (String)

The user phone in Tiledesk Contacts

userEmail (String)

The user email in Tiledesk Contacts

userLeadId (String)

The user contact Id in Tiledesk Contacts

userCompany (String)

The user Company name in Tiledesk Contacts

userFullname (String)

The user Fullname in Tiledesk Contacts

decodedCustomJWT (JSON)

The JWT used by this user to authenticate with Custom (Strong) authentication.

If you wnat to show up the decoded JWT Json use syntax: .

It is the LiquidJS lirary syntax to Stringify a JSON object.

decodedCustomJWT example:

{
    "iat": 1727252***,
    "sub": "userexternal",
    "aud": "https://tiledesk.com/projects/6406e34727b57500120b1***",
    "_id": "6406e34727b57500120b1bd6_745408***",
    "firstname": "Andrew",
    "lastname": "Flavor",
    "email": "**@***.us",
    "profile": "Admin",
    "classified": "true",
    "id": "6406e34727b57500120b3bd8_745408***",
    "fullName": "Andrew Flavor"
}

strongAuthenticated (String)

It tells if the user used Custom (Strong) Authentication to authenticate in the conversation. Values are “true” or “false”

 

Dynamic Attributes

 

timestamp (Number)

The current timestamp in millis (Number format)

now (ISO date)

The current date in the ISODate format. Ex. 2024-09-25T10:14:41.638Z (String format)

UUID (String)

A dynamic generated UUID obtained from a UUIDv4 removing the dashes

UUIDv4 (String)

A dynamic standard UUIDv4